using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._DataComparison
{
    /// <summary>
    /// <para>File Compare</para>
    /// <para>Compares two files and returns the comparison results..</para>
    /// <para>比较两个文件并返回比较结果。</para>
    /// </summary>    
    [DisplayName("File Compare")]
    public class FileCompare : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FileCompare()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_base_file">
        /// <para>Input Base File</para>
        /// <para>The Input Base File is compared with the Input Test File. The Input Base File refers to a file that you have declared valid. This base file has the correct content and information.</para>
        /// <para>将输入基本文件与输入测试文件进行比较。输入基本文件是指已声明有效的文件。此基本文件具有正确的内容和信息。</para>
        /// </param>
        /// <param name="_in_test_file">
        /// <para>Input Test File</para>
        /// <para>The Input Test File is compared against the Input Base File. The Input Test File refers to a file that you have made changes to by editing or compiling new information.</para>
        /// <para>将输入测试文件与输入基础文件进行比较。输入测试文件是指通过编辑或编译新信息而进行更改的文件。</para>
        /// </param>
        public FileCompare(object _in_base_file, object _in_test_file)
        {
            this._in_base_file = _in_base_file;
            this._in_test_file = _in_test_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "File Compare";

        public override string CallName => "management.FileCompare";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_base_file, _in_test_file, _file_type.GetGPValue(), _continue_compare.GetGPValue(), _out_compare_file, _compare_status.GetGPValue()];

        /// <summary>
        /// <para>Input Base File</para>
        /// <para>The Input Base File is compared with the Input Test File. The Input Base File refers to a file that you have declared valid. This base file has the correct content and information.</para>
        /// <para>将输入基本文件与输入测试文件进行比较。输入基本文件是指已声明有效的文件。此基本文件具有正确的内容和信息。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Base File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_base_file { get; set; }


        /// <summary>
        /// <para>Input Test File</para>
        /// <para>The Input Test File is compared against the Input Base File. The Input Test File refers to a file that you have made changes to by editing or compiling new information.</para>
        /// <para>将输入测试文件与输入基础文件进行比较。输入测试文件是指通过编辑或编译新信息而进行更改的文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Test File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_test_file { get; set; }


        /// <summary>
        /// <para>File Type</para>
        /// <para><xdoc>
        ///   <para>The type of files being compared.</para>
        ///   <bulletList>
        ///     <bullet_item>ASCII—Compare using ASCII characters. This is the default.</bullet_item><para/>
        ///     <bullet_item>Binary—Perform a binary compare.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要比较的文件类型。</para>
        ///   <bulletList>
        ///     <bullet_item>ASCII - 使用 ASCII 字符进行比较。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>二进制 （Binary） - 执行二进制比较。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("File Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _file_type_value _file_type { get; set; } = _file_type_value._ASCII;

        public enum _file_type_value
        {
            /// <summary>
            /// <para>ASCII</para>
            /// <para>ASCII—Compare using ASCII characters. This is the default.</para>
            /// <para>ASCII - 使用 ASCII 字符进行比较。这是默认设置。</para>
            /// </summary>
            [Description("ASCII")]
            [GPEnumValue("ASCII")]
            _ASCII,

            /// <summary>
            /// <para>Binary</para>
            /// <para>Binary—Perform a binary compare.</para>
            /// <para>二进制 （Binary） - 执行二进制比较。</para>
            /// </summary>
            [Description("Binary")]
            [GPEnumValue("BINARY")]
            _BINARY,

        }

        /// <summary>
        /// <para>Continue Comparison</para>
        /// <para><xdoc>
        ///   <para>Indicates whether to compare all properties after encountering the first mismatch.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Stops after encountering the first mismatch. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Compares other properties after encountering the first mismatch.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指示在遇到第一个不匹配后是否比较所有属性。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 在遇到第一个不匹配后停止。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 在遇到第一个不匹配后比较其他属性。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Continue Comparison")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _continue_compare_value _continue_compare { get; set; } = _continue_compare_value._false;

        public enum _continue_compare_value
        {
            /// <summary>
            /// <para>CONTINUE_COMPARE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CONTINUE_COMPARE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_CONTINUE_COMPARE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CONTINUE_COMPARE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Compare File</para>
        /// <para>This file will contain all similarities and differences between the Input Base File and the Input Test File. This file is a comma-delimited text file which can be viewed and used as a table in ArcGIS.</para>
        /// <para>此文件将包含输入基础文件和输入测试文件之间的所有相似之处和不同之处。此文件是一个逗号分隔的文本文件，可在 ArcGIS 中作为表进行查看和使用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Compare File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_compare_file { get; set; } = null;


        /// <summary>
        /// <para>Compare Status</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compare Status")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public _compare_status_value _compare_status { get; set; }

        public enum _compare_status_value
        {
            /// <summary>
            /// <para>NO_DIFFERENCES_FOUND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_DIFFERENCES_FOUND")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DIFFERENCES_FOUND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DIFFERENCES_FOUND")]
            [GPEnumValue("false")]
            _false,

        }

        public FileCompare SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}